import Vue from 'vue'
import VueRouter from 'vue-router'
import AFHome from '@/views/AFHome.vue'
import Guide from '@/views/Guide.vue'
import Issue from '@/views/Issue.vue'
import Top from '@/views/Top.vue'
import Details from '@/views/Details.vue'
import Story from '@/views/Story.vue'
import Character from '@/views/Character.vue'
import Stream from '@/views/Stream.vue'
import Special from '@/views/Special.vue'
import PageNotFind from '@/views/PageNotFind.vue'

Vue.use(VueRouter)

const routes = [{
  path: '/',
  redirect: '/af'
},
{
  path: '/af',
  component: AFHome
},
{
  path: '/guide',
  component: Guide
},
{
  path: '/issue',
  component: Issue
},
{
  path: '/top',
  component: Top
},
{
  path: '/details',
  component: Details,
  redirect: '/details/story',
  children: [
    { path: '/details/story', component: Story },
    { path: '/details/character', component: Character },
    { path: '/details/stream', component: Stream },
    { path: '/details/special', component: Special }
  ]
},
{
  path: '*',
  component: PageNotFind
}
]

const router = new VueRouter({
  routes
})

export default router
